package com.dq.eduservice.controller;

import com.dq.commonutils.vo.Result;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @project: guli_parent
 * @ClassName: EduLoginController
 * @author: dq
 * @creat: 2022/7/16 21:05
 */
@RestController
@RequestMapping("eduservice/user")
public class EduLoginController {

    /**
     * 登录
     * @return
     */
    @PostMapping("login")
    public Result eduLogin(String username,String password){
        System.out.println("111");
        Map<String, String> map = new HashMap<>();
        map.put("token","admin");
        return Result.success(map);
    }

    /**
     * 信息
     * @return
     */
    @GetMapping("info")
    public Result eduInfo(){
        Map<String, String> map = new HashMap<>();
        map.put("roles","[admin]");
        map.put("name","admin");
        map.put("avatar","https://tse4-mm.cn.bing.net/th/id/OIP-C.KahOuGe_dbUyfn3zsafjLAAAAA?w=210&h=210&c=7&r=0&o=5&dpr=1.25&pid=1.7");
        return Result.success(map);
    }
}
